<?php
namespace app\admin\model;
class GoodsClassification extends \think\Model{ 
    //商品类别表对商品表的一对多关联
    public function goods(){
        return $this->hasOne('Goods','id','goods_id');
    }
    //商品类别表对商品属性表的一对一关联
    public function goodsAttr(){
        return $this->hasOne('GoodsAttr','goods_id','goods_id');
    }
    //商品类别表对商品图片表的一对多关联
    public function goodsPictures(){
        return $this->hasMany('GoodsPictures','goods_id','goods_id');
    }      
}